<?php


namespace app\user\controller;


use think\Db;

class Notice extends Base
{
    public function NoticeList(){
        //总记录条数
        $Count = NoticeCount();
        $this->assign('Count',$Count);

        //公告列表
        $NoticeList = NoticeList();
        $this->assign('NoticeList',$NoticeList['NoticeList']);

        //分页
        $this->assign('Page', $NoticeList['Page']);
        return $this->fetch('NoticeList');
    }

    public function NoticeDetail(){
        $id = Param('id');
        $detail = Db::name('notice')->find($id);
        $this->assign('detail',$detail);
        return $this->fetch('NoticeDetail');
    }
}